import numpy as np
def test_newaxis():
    # 创建一个示例数组
    resized = np.array([[1, 2, 3], [4, 5, 6]])
    # 应用 np.newaxis 操作
    result = resized[..., np.newaxis]
    return result

if __name__ == "__main__":
    # 调用函数并打印结果
    output = test_newaxis()
    print("原始数组形状:", np.array([[1, 2, 3], [4, 5, 6]]).shape)
    print("添加新轴后的数组形状:", output.shape)
    print("添加新轴后的数组:\n", output)
